import json

# with open("data.json",mode="w") as f:
#     data = {'name': 'yuan', 'age': 18, "is_married": False, "gf": None}
#     data_json = json.dumps(data)
#     f.write(data_json)

with open("data.json",mode="r") as f:
    data_json = f.read()
    print(data_json, type(data_json))
    data_dict = json.loads(data_json)
    print(data_dict, type(data_dict))